package com.why.whypaydemo.confing;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 微信配置类
 */
@Configuration
@Getter
@Setter
public class WeChatConfig {


    /**
     * 公众号appid
     */

    private String appId="wxfdd02a5bec574795";

//    /**
//     * 公众号秘钥
//     */
//    @Value("${wxpay.appsecret}")
//    private String appsecret;
//
//
    private String openAppid="wxb6411cbea5c*****";
//
//    /**
//     * 开放平台appsecret
//     */
//    @Value("${wxopen.appsecret}")
//    private String openAppsecret;
//
//
//    /**
//     * 开放平台回调url
//     */
//    private String openRedirectUrl;
//
//
//    /**
//     * 微信开放平台二维码连接
//     */
//    private final static String OPEN_QRCODE_URL= "https://open.weixin.qq.com/connect/qrconnect?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_login&state=%s#wechat_redirect";
//
//
//    /**
//     * 开放平台获取access_token地址
//     */
//    private final static String OPEN_ACCESS_TOKEN_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
//
//
//    /**
//     * 获取用户信息
//     */
//    private final static String OPEN_USER_INFO_URL ="https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN";


    /**
     * 商户号id
     */
    private String mchId="1268325001";

    public  String sub_mch_id = "1348905801";
    /**
     * 支付key
     */
    private String key="ydVddlQ0hSufjipTGxZh3VTig8Ryl4UY";

    /**
     * 微信支付回调url
     */
    private String payCallbackUrl="http://8iy7uzca.shenzhuo.vip:21480/wxPay/order/callback";


    /**
     * 统一下单url
     */
    private static final String UNIFIED_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";


    public static String getUnifiedOrderUrl() {
        return UNIFIED_ORDER_URL;
    }
}
